package org.dtrd.modules.doctor.entity.bean;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.dtrd.config.system.Constant;
import org.dtrd.modules.doctor.entity.po.DtrdEntRdDoctor;

/**
 * @author qr
 * @date 2021/12/18 14:53
 */
@ApiModel("医生执业成就")
@Getter
@Setter
public class DoctorAchievement {

    private String avatar;

    private String doctorName;

    private String position;

    @ApiModelProperty("患者池")
    private Integer patientTotal;

    @ApiModelProperty("在管人数")
    private Long patientInManage;

    @ApiModelProperty("续管人数")
    private Long patientContinueManage;

    @ApiModelProperty("已购体验服务包")
    private Integer packageTotal;

    @ApiModelProperty("本周预约人数")
    private Integer appointmentNumWeekly;

    public DoctorAchievement parseFromPo(DtrdEntRdDoctor po) {
        this.avatar = po.getDoctorsImg();
        this.doctorName = po.getDoctorsName();
        if (po.getDoctorsLevelId() != null) {
            this.position = Constant.Level.valueOf(po.getDoctorsLevelId()).getName();
        }
        return this;
    }
}
